﻿
Imports std
Imports storoomc

Public Class globalInitial
    Inherits requestProcessor

    Public Overrides Function pathidentity() As String
        Return "__INVALID_PATH_IDENTITY__"
    End Function

    Public Overrides Sub initial(Optional ByVal config As configParser = Nothing)
        MyBase.initial(config)
        assert(Not config Is Nothing, "globalInitial need a valid config to initialize.")

        If rooms Is Nothing Then
            rooms = New vector(Of room)()
        Else
            rooms.clear()
        End If

        Dim lines As vector(Of String) = Nothing
        If config.readlist(configNaming.roomview.name, configNaming.roomview.room, lines) AndAlso _
           Not lines Is Nothing AndAlso lines.size() > 0 Then
            Dim i As Int64
            For i = 0 To lines.size() - 1
                Dim r As room = Nothing
                r = room.parse(lines(i))
                If Not r Is Nothing Then
                    rooms.push_back(r)
                End If
            Next
        End If
    End Sub

    Public Overrides Function process(ByVal context As httpContext) As Boolean
        Return False
    End Function
End Class
